package intelligent_maintenances

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type IntelligentMaintenanceRouter struct {}

// InitIntelligentMaintenanceRouter 初始化 智能保养 路由信息
func (s *IntelligentMaintenanceRouter) InitIntelligentMaintenanceRouter(Router *gin.RouterGroup,PublicRouter *gin.RouterGroup) {
	intelligentMaintenanceRouter := Router.Group("intelligentMaintenance").Use(middleware.OperationRecord())
	intelligentMaintenanceRouterWithoutRecord := Router.Group("intelligentMaintenance")
	intelligentMaintenanceRouterWithoutAuth := PublicRouter.Group("intelligentMaintenance")
	{
		intelligentMaintenanceRouter.POST("createIntelligentMaintenance", intelligentMaintenanceApi.CreateIntelligentMaintenance)   // 新建智能保养
		intelligentMaintenanceRouter.DELETE("deleteIntelligentMaintenance", intelligentMaintenanceApi.DeleteIntelligentMaintenance) // 删除智能保养
		intelligentMaintenanceRouter.DELETE("deleteIntelligentMaintenanceByIds", intelligentMaintenanceApi.DeleteIntelligentMaintenanceByIds) // 批量删除智能保养
		intelligentMaintenanceRouter.PUT("updateIntelligentMaintenance", intelligentMaintenanceApi.UpdateIntelligentMaintenance)    // 更新智能保养
	}
	{
		intelligentMaintenanceRouterWithoutRecord.GET("findIntelligentMaintenance", intelligentMaintenanceApi.FindIntelligentMaintenance)        // 根据ID获取智能保养
		intelligentMaintenanceRouterWithoutRecord.GET("getIntelligentMaintenanceList", intelligentMaintenanceApi.GetIntelligentMaintenanceList)  // 获取智能保养列表
	}
	{
	    intelligentMaintenanceRouterWithoutAuth.GET("getIntelligentMaintenancePublic", intelligentMaintenanceApi.GetIntelligentMaintenancePublic)  // 智能保养开放接口
	}
}
